/**
 *
 * Copyright (c) 2011 TLOSS. All rights reserved.
 * Created on Apr 22, 2011
 *
 */
package com.tloss.database.db2obj.classpath;

import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.InputStream;
import java.util.List;

import com.tloss.database.db2obj.classpath.except.InvalidConfiguration;


/**
 * @author Tran Tung
 *
 */
public abstract class Configuration {
	protected List<String> sources;
	protected List<String> libraries;
	protected String projectName;
	protected String compilerSource;
	protected String compilerTarget;
	public String getCompilerSource() {
		return compilerSource;
	}

	public void setCompilerSource(String compilerSource) {
		this.compilerSource = compilerSource;
	}

	public String getCompilerTarget() {
		return compilerTarget;
	}

	public void setCompilerTarget(String compilerTarget) {
		this.compilerTarget = compilerTarget;
	}

	public void readConfig(String filename) throws FileNotFoundException,
			InvalidConfiguration {
		FileInputStream inputStream = new FileInputStream(filename);
		readConfig(inputStream);
	}

	public abstract void readConfig(InputStream inputStream)
			throws InvalidConfiguration;

	public List<String> getSources() {
		return sources;
	}

	public List<String> getLibraries() {
		return libraries;
	}

	public String getProjectName() {
		return projectName;
	}
	

}
